package com.kevin.spring.service;

import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@EnableConfigurationProperties(RpcProvideProperties.class)
public class RpcProviderAutoConfiguration {


    @Bean
    public SpringRpcProviderBean getSpringRpcProviderBean(RpcProvideProperties rpcProvideProperties){
        return new SpringRpcProviderBean(rpcProvideProperties.getServerIp(),rpcProvideProperties.getServerPort());
    }
}
